package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the per_pms_dept database table.
 * 
 */
@Entity
@Table(name="per_pms_dept")
@NamedQuery(name="PerPmsDept.findAll", query="SELECT p FROM PerPmsDept p")
public class PerPmsDept implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int deptid;

	private String deptname;

	private int deptss;

	private Timestamp depttime;

	private String deptzy;

	//bi-directional many-to-one association to PerCwaCwas
	@OneToMany(mappedBy="perPmsDept")
	private List<PerCwaCwas> perCwaCwas;

	//bi-directional many-to-one association to PerCwaTem
	@OneToMany(mappedBy="perPmsDept")
	private List<PerCwaTem> perCwaTems;

	//bi-directional many-to-one association to PerIntention
	@OneToMany(mappedBy="perPmsDept")
	private List<PerIntention> perIntentions;

	//bi-directional many-to-one association to PerPmsBzb
	@OneToMany(mappedBy="perPmsDept")
	private List<PerPmsBzb> perPmsBzbs;

	//bi-directional many-to-one association to PerPmsDis
	@OneToMany(mappedBy="perPmsDept")
	private List<PerPmsDis> perPmsDis;

	//bi-directional many-to-one association to PerPmsMgm
	@OneToMany(mappedBy="perPmsDept")
	private List<PerPmsMgm> perPmsMgms;

	//bi-directional many-to-one association to PerPmsStm
	@OneToMany(mappedBy="perPmsDept")
	private List<PerPmsStm> perPmsStms;

	//bi-directional many-to-one association to PerPmsYBun
	@OneToMany(mappedBy="perPmsDept")
	private List<PerPmsYBun> perPmsYBuns;

	//bi-directional many-to-one association to PerRetWAlt
	@OneToMany(mappedBy="perPmsDept")
	private List<PerRetWAlt> perRetWAlts;

	public PerPmsDept() {
	}

	public int getDeptid() {
		return this.deptid;
	}

	public void setDeptid(int deptid) {
		this.deptid = deptid;
	}

	public String getDeptname() {
		return this.deptname;
	}

	public void setDeptname(String deptname) {
		this.deptname = deptname;
	}

	public int getDeptss() {
		return this.deptss;
	}

	public void setDeptss(int deptss) {
		this.deptss = deptss;
	}

	public Timestamp getDepttime() {
		return this.depttime;
	}

	public void setDepttime(Timestamp depttime) {
		this.depttime = depttime;
	}

	public String getDeptzy() {
		return this.deptzy;
	}

	public void setDeptzy(String deptzy) {
		this.deptzy = deptzy;
	}

	public List<PerCwaCwas> getPerCwaCwas() {
		return this.perCwaCwas;
	}

	public void setPerCwaCwas(List<PerCwaCwas> perCwaCwas) {
		this.perCwaCwas = perCwaCwas;
	}

	public PerCwaCwas addPerCwaCwa(PerCwaCwas perCwaCwa) {
		getPerCwaCwas().add(perCwaCwa);
		perCwaCwa.setPerPmsDept(this);

		return perCwaCwa;
	}

	public PerCwaCwas removePerCwaCwa(PerCwaCwas perCwaCwa) {
		getPerCwaCwas().remove(perCwaCwa);
		perCwaCwa.setPerPmsDept(null);

		return perCwaCwa;
	}

	public List<PerCwaTem> getPerCwaTems() {
		return this.perCwaTems;
	}

	public void setPerCwaTems(List<PerCwaTem> perCwaTems) {
		this.perCwaTems = perCwaTems;
	}

	public PerCwaTem addPerCwaTem(PerCwaTem perCwaTem) {
		getPerCwaTems().add(perCwaTem);
		perCwaTem.setPerPmsDept(this);

		return perCwaTem;
	}

	public PerCwaTem removePerCwaTem(PerCwaTem perCwaTem) {
		getPerCwaTems().remove(perCwaTem);
		perCwaTem.setPerPmsDept(null);

		return perCwaTem;
	}

	public List<PerIntention> getPerIntentions() {
		return this.perIntentions;
	}

	public void setPerIntentions(List<PerIntention> perIntentions) {
		this.perIntentions = perIntentions;
	}

	public PerIntention addPerIntention(PerIntention perIntention) {
		getPerIntentions().add(perIntention);
		perIntention.setPerPmsDept(this);

		return perIntention;
	}

	public PerIntention removePerIntention(PerIntention perIntention) {
		getPerIntentions().remove(perIntention);
		perIntention.setPerPmsDept(null);

		return perIntention;
	}

	public List<PerPmsBzb> getPerPmsBzbs() {
		return this.perPmsBzbs;
	}

	public void setPerPmsBzbs(List<PerPmsBzb> perPmsBzbs) {
		this.perPmsBzbs = perPmsBzbs;
	}

	public PerPmsBzb addPerPmsBzb(PerPmsBzb perPmsBzb) {
		getPerPmsBzbs().add(perPmsBzb);
		perPmsBzb.setPerPmsDept(this);

		return perPmsBzb;
	}

	public PerPmsBzb removePerPmsBzb(PerPmsBzb perPmsBzb) {
		getPerPmsBzbs().remove(perPmsBzb);
		perPmsBzb.setPerPmsDept(null);

		return perPmsBzb;
	}

	public List<PerPmsDis> getPerPmsDis() {
		return this.perPmsDis;
	}

	public void setPerPmsDis(List<PerPmsDis> perPmsDis) {
		this.perPmsDis = perPmsDis;
	}

	public PerPmsDis addPerPmsDi(PerPmsDis perPmsDi) {
		getPerPmsDis().add(perPmsDi);
		perPmsDi.setPerPmsDept(this);

		return perPmsDi;
	}

	public PerPmsDis removePerPmsDi(PerPmsDis perPmsDi) {
		getPerPmsDis().remove(perPmsDi);
		perPmsDi.setPerPmsDept(null);

		return perPmsDi;
	}

	public List<PerPmsMgm> getPerPmsMgms() {
		return this.perPmsMgms;
	}

	public void setPerPmsMgms(List<PerPmsMgm> perPmsMgms) {
		this.perPmsMgms = perPmsMgms;
	}

	public PerPmsMgm addPerPmsMgm(PerPmsMgm perPmsMgm) {
		getPerPmsMgms().add(perPmsMgm);
		perPmsMgm.setPerPmsDept(this);

		return perPmsMgm;
	}

	public PerPmsMgm removePerPmsMgm(PerPmsMgm perPmsMgm) {
		getPerPmsMgms().remove(perPmsMgm);
		perPmsMgm.setPerPmsDept(null);

		return perPmsMgm;
	}

	public List<PerPmsStm> getPerPmsStms() {
		return this.perPmsStms;
	}

	public void setPerPmsStms(List<PerPmsStm> perPmsStms) {
		this.perPmsStms = perPmsStms;
	}

	public PerPmsStm addPerPmsStm(PerPmsStm perPmsStm) {
		getPerPmsStms().add(perPmsStm);
		perPmsStm.setPerPmsDept(this);

		return perPmsStm;
	}

	public PerPmsStm removePerPmsStm(PerPmsStm perPmsStm) {
		getPerPmsStms().remove(perPmsStm);
		perPmsStm.setPerPmsDept(null);

		return perPmsStm;
	}

	public List<PerPmsYBun> getPerPmsYBuns() {
		return this.perPmsYBuns;
	}

	public void setPerPmsYBuns(List<PerPmsYBun> perPmsYBuns) {
		this.perPmsYBuns = perPmsYBuns;
	}

	public PerPmsYBun addPerPmsYBun(PerPmsYBun perPmsYBun) {
		getPerPmsYBuns().add(perPmsYBun);
		perPmsYBun.setPerPmsDept(this);

		return perPmsYBun;
	}

	public PerPmsYBun removePerPmsYBun(PerPmsYBun perPmsYBun) {
		getPerPmsYBuns().remove(perPmsYBun);
		perPmsYBun.setPerPmsDept(null);

		return perPmsYBun;
	}

	public List<PerRetWAlt> getPerRetWAlts() {
		return this.perRetWAlts;
	}

	public void setPerRetWAlts(List<PerRetWAlt> perRetWAlts) {
		this.perRetWAlts = perRetWAlts;
	}

	public PerRetWAlt addPerRetWAlt(PerRetWAlt perRetWAlt) {
		getPerRetWAlts().add(perRetWAlt);
		perRetWAlt.setPerPmsDept(this);

		return perRetWAlt;
	}

	public PerRetWAlt removePerRetWAlt(PerRetWAlt perRetWAlt) {
		getPerRetWAlts().remove(perRetWAlt);
		perRetWAlt.setPerPmsDept(null);

		return perRetWAlt;
	}

}